<template>
	<view class="itembox" v-if="datalist.length>0">
		<view class="item" v-for="(item,index) in datalist" :key="index">
			<view class="top">
				<text>提现</text>
				<text>{{item.time}}</text>
			</view>
			<view class="bottom">
				<text>余额：{{item.amount}}</text>
				<text>-{{item.balance}}</text>
			</view>
		</view>
	</view>
	<view class="item text-center" v-else>
		<view class="iconfontPT iconzanwushuju1"></view>
		<text class="noColor ">暂无提现记录</text>
	</view>
</template>

<script>
	import { forward} from "../../../apis/shop/api.js"
	export default{
		data(){
			return{
				datalist:[],
				store_id:"",
				token:""
			}
		},
		onLoad() {
			this.store_id = uni.getStorageSync("store_id");
			this.token = uni.getStorageSync("token");
			this.getList()
		},
		methods:{
			getList(){
				let that = this 
				forward({
					store_id:that.store_id,
					token:that.token
				}).then(res=>{
					if(res.code == 1){
						that.datalist = res.data.forward
					}
					else{
						uni.showToast({
							title:res.msg,
							icon:"none"
						})
					}
				})
			}
		}
	}
</script>

<style lang="less">
	.item{
		border-bottom: 1rpx solid #CFCFCF;
		padding: 30rpx;
		.top,.bottom{
			&::after{
				content: "";
				display: block;
				height: 0;
				overflow: hidden;
				clear: both;
			}
			
		}
		.top{
			text{
				&:nth-child(1){
					float: left;
					font-size: 30rpx;
					color: #333;
					line-height: 40rpx;
				}
				&:nth-child(2){
					float: right;
					font-size: 24rpx;
					line-height: 40rpx;
					color: #999;
				}
			}
		}
		.bottom{
			text{
				&:nth-child(1){
					float: left;
					font-size: 24rpx;
					line-height: 40rpx;
					color: #333;
				}
				&:nth-child(2){
					float: right;
					font-size: 30rpx;
					line-height:40rpx;
					color: #333;
				}
			}
		}
		.noColor{
			color: #999999;
		}
		.iconzanwushuju1{
			font-size: 40px;
			margin-bottom: 10px;

		}
		
	}
	.text-center{
		border-bottom: 0;
		padding: 60rpx 30rpx;
	}
</style>
